package com.kyleswebspace.propertyanalyzer.gui;

import java.awt.Color;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

import javax.swing.JPanel;

import com.kyleswebspace.propertyanalyzer.config.ColorBox;
import com.kyleswebspace.propertyanalyzer.model.DataModel;

public class RightMainPanel extends JPanel {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -7294659523594260871L;
	private final Color backgroundColor = ColorBox.backgroundPanelColor;
	
	public RightMainPanel(DataModel dm, FocusMediator fm) {
		
		this.setLayout(new GridBagLayout());
		GridBagConstraints constraints = new GridBagConstraints();
		constraints.anchor = GridBagConstraints.NORTHWEST;
		constraints.insets = new Insets(10, 10, 0, 10);
		constraints.ipadx = 20;
		constraints.ipady = 0;
		//constraints.fill = GridBagConstraints.BOTH;

		this.setBackground(backgroundColor);
		
		constraints.gridx = 0;
		constraints.gridy = 0;
		constraints.gridheight = 4;
		constraints.gridwidth = 6;
		this.add(new FinancingPanel(dm, fm), constraints);
		
		constraints.gridx = 0;
		constraints.gridheight = 2;
		constraints.gridy = 4;
		this.add(new CashflowSummaryPanel(dm), constraints);
		
		constraints.gridx = 0;
		constraints.gridheight = 4;
		constraints.gridy = 6;
		this.add(new KeyIndicatorsPanel(dm, fm), constraints);

		constraints.gridx = 0;
		constraints.gridheight = 3;
		constraints.gridy = 10;
		this.add(new PotentialTaxableIncomePanel(dm), constraints);
	}
}
